package DP.factoryMethod.common;

import DP.factoryMethod.common.creator.Creator;
import DP.factoryMethod.common.creator.impl.ConcreteCreator;
import DP.factoryMethod.common.product.impl.ConcreteProduct1;
import DP.factoryMethod.common.product.impl.ConcreteProduct2;

/**
 * @author msi
 * 场景类
 */
public class Client {
    public static void main(String[] args) {
        Creator creator=new ConcreteCreator();
        ConcreteProduct1 concreteProduct1 = creator.createProduct(ConcreteProduct1.class);
        ConcreteProduct2 concreteProduct2 = creator.createProduct(ConcreteProduct2.class);
        concreteProduct1.method2();
        concreteProduct2.method2();
    }
}
